package com.zheng.damo01.HomeWeark03;

import java.util.ArrayList;
import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        Integer[] arr={1,2,3,4,5};
        method(arr,0,3);
        System.out.println(Arrays.toString(arr));

    }
    public static <T> void method(T[] arr,int a,int b){
        T tamp=arr[a];
        arr[a]=arr[b];
        arr[b]=tamp;
    }
}
